#include "x11/atoms.hpp"

#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>

xcb_atom_t _NET_SUPPORTED;
xcb_atom_t _NET_CURRENT_DESKTOP;
xcb_atom_t _NET_ACTIVE_WINDOW;
xcb_atom_t _NET_WM_NAME;
xcb_atom_t _NET_WM_DESKTOP;
xcb_atom_t _NET_WM_VISIBLE_NAME;
xcb_atom_t _NET_WM_WINDOW_TYPE;
xcb_atom_t _NET_WM_WINDOW_TYPE_DOCK;
xcb_atom_t _NET_WM_WINDOW_TYPE_NORMAL;
xcb_atom_t _NET_WM_PID;
xcb_atom_t _NET_WM_STATE;
xcb_atom_t _NET_WM_STATE_STICKY;
xcb_atom_t _NET_WM_STATE_SKIP_TASKBAR;
xcb_atom_t _NET_WM_STATE_ABOVE;
xcb_atom_t _NET_WM_STATE_MAXIMIZED_VERT;
xcb_atom_t _NET_WM_STRUT;
xcb_atom_t _NET_WM_STRUT_PARTIAL;
xcb_atom_t WM_PROTOCOLS;
xcb_atom_t WM_DELETE_WINDOW;
xcb_atom_t _XEMBED;
xcb_atom_t _XEMBED_INFO;
xcb_atom_t MANAGER;
xcb_atom_t WM_STATE;
xcb_atom_t _NET_SYSTEM_TRAY_OPCODE;
xcb_atom_t _NET_SYSTEM_TRAY_ORIENTATION;
xcb_atom_t _NET_SYSTEM_TRAY_VISUAL;
xcb_atom_t _NET_SYSTEM_TRAY_COLORS;
xcb_atom_t WM_TAKE_FOCUS;
xcb_atom_t Backlight;
xcb_atom_t BACKLIGHT;
xcb_atom_t _XROOTPMAP_ID;
xcb_atom_t _XSETROOT_ID;
xcb_atom_t ESETROOT_PMAP_ID;
xcb_atom_t _COMPTON_SHADOW;
xcb_atom_t _NET_WM_WINDOW_OPACITY;
xcb_atom_t WM_HINTS;

// clang-format off
std::array<cached_atom, 36> ATOMS = {{
  {"_NET_SUPPORTED", _NET_SUPPORTED},
  {"_NET_CURRENT_DESKTOP", _NET_CURRENT_DESKTOP},
  {"_NET_ACTIVE_WINDOW", _NET_ACTIVE_WINDOW},
  {"_NET_WM_NAME", _NET_WM_NAME},
  {"_NET_WM_DESKTOP", _NET_WM_DESKTOP},
  {"_NET_WM_VISIBLE_NAME", _NET_WM_VISIBLE_NAME},
  {"_NET_WM_WINDOW_TYPE", _NET_WM_WINDOW_TYPE},
  {"_NET_WM_WINDOW_TYPE_DOCK", _NET_WM_WINDOW_TYPE_DOCK},
  {"_NET_WM_WINDOW_TYPE_NORMAL", _NET_WM_WINDOW_TYPE_NORMAL},
  {"_NET_WM_PID", _NET_WM_PID},
  {"_NET_WM_STATE", _NET_WM_STATE},
  {"_NET_WM_STATE_STICKY", _NET_WM_STATE_STICKY},
  {"_NET_WM_STATE_SKIP_TASKBAR", _NET_WM_STATE_SKIP_TASKBAR},
  {"_NET_WM_STATE_ABOVE", _NET_WM_STATE_ABOVE},
  {"_NET_WM_STATE_MAXIMIZED_VERT", _NET_WM_STATE_MAXIMIZED_VERT},
  {"_NET_WM_STRUT", _NET_WM_STRUT},
  {"_NET_WM_STRUT_PARTIAL", _NET_WM_STRUT_PARTIAL},
  {"WM_PROTOCOLS", WM_PROTOCOLS},
  {"WM_DELETE_WINDOW", WM_DELETE_WINDOW},
  {"_XEMBED", _XEMBED},
  {"_XEMBED_INFO", _XEMBED_INFO},
  {"MANAGER", MANAGER},
  {"WM_STATE", WM_STATE},
  {"_NET_SYSTEM_TRAY_OPCODE", _NET_SYSTEM_TRAY_OPCODE},
  {"_NET_SYSTEM_TRAY_ORIENTATION", _NET_SYSTEM_TRAY_ORIENTATION},
  {"_NET_SYSTEM_TRAY_VISUAL", _NET_SYSTEM_TRAY_VISUAL},
  {"_NET_SYSTEM_TRAY_COLORS", _NET_SYSTEM_TRAY_COLORS},
  {"WM_TAKE_FOCUS", WM_TAKE_FOCUS},
  {"Backlight", Backlight},
  {"BACKLIGHT", BACKLIGHT},
  {"_XROOTPMAP_ID", _XROOTPMAP_ID},
  {"_XSETROOT_ID", _XSETROOT_ID},
  {"ESETROOT_PMAP_ID", ESETROOT_PMAP_ID},
  {"_COMPTON_SHADOW", _COMPTON_SHADOW},
  {"_NET_WM_WINDOW_OPACITY", _NET_WM_WINDOW_OPACITY},
  {"WM_HINTS", WM_HINTS},
}};
// clang-format on
